package cn.tedu.sp09.feign;

import cn.tedu.sp01.pojo.Item;
import cn.tedu.web.util.JsonResult;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@Component
public class ItemFeignClientFB implements ItemFeignClient{

    @Override
    public JsonResult<List<Item>> getItems(@PathVariable String orderId){
        return JsonResult.err("feign降级代码执行:  无法获取商品列表......");
    }

    @Override
    public JsonResult<?> decreaseNumber(@RequestBody List<Item> items){
        return JsonResult.err("feign降级代码执行:  无法修改商品库存......");
    }
}
